function sell_horse_saddles_form() {

var customer_name = document.getElementById("customer_name").value;
var customer_email = document.getElementById("customer_email").value;
var customer_postcode = document.getElementById("customer_postcode").value;
var customer_number = document.getElementById("customer_number").value;
var estimate_price = document.getElementById("estimate_price").value;
var saddle_name = document.getElementById("saddle_name").value;
var saddle_colour = document.getElementById("saddle_colour").value;
var saddle_size = document.getElementById("saddle_size").value;
//var sell_message = document.getElementById("sell_message").value;

var image1 = document.getElementById("uploaded_file_1").value;
var image2 = document.getElementById("uploaded_file_2").value;
var image3 = document.getElementById("uploaded_file_3").value;
var image4 = document.getElementById("uploaded_file_4").value;


var missing = new Array();

if (customer_name == "") {missing.push("Your name");}
if (customer_email == "") {missing.push("Your email");}
if (customer_postcode == "") {missing.push("Your postcode");}
if (customer_number == "") {missing.push("Your phone number");}
if (estimate_price == "") {missing.push("Your estimated price");}
if (saddle_name == "") {missing.push("Saddle name");}
if (saddle_colour == "") {missing.push("Saddle colour");}
if (saddle_size == "") {missing.push("Saddle size");}
//if (sell_message == "") {missing.push("Your message");}

if (image1=="" && image2=="" && image3=="" && image4=="") {missing.push("Please upload at least one image");}

	
if(missing.length > 0)
{   
    alert(missing.join("\n")); 
}
else
{
	document.forms["sell_saddle_details"].submit();	   
}

	
}

function contact_us_form() {

var contact_name = document.getElementById("contact_name").value;
var contact_email = document.getElementById("contact_email").value;
var contact_number = document.getElementById("contact_number").value;
var contact_message = document.getElementById("contact_message").value;

var missing = new Array();

if (contact_name == "") {missing.push("Your name");}
if (contact_email == "") {missing.push("Your email");}
if (contact_number == "") {missing.push("Your phone number");}
if (contact_message == "") {missing.push("Your message");}

if(missing.length > 0)
{   
    alert(missing.join("\n")); 
}
else
{
	document.forms["contact_us"].submit();	   
}

	
}

function change_password_form() {

var new_password = document.getElementById("new_pass").value;

var missing = new Array();

if (new_password == "") {missing.push("You must enter a new password");}

if(missing.length > 0)
{   
    alert(missing.join("\n")); 
}
else
{
	document.forms["change_password"].submit();	   
}

	
}